<div class="zs-body" data-ng-init="formInit('registerservice', {
		keyField:'id',
		randomFields:['id'],
		orderObject:{order:0} 
	}) && loadData('registerservice');setConHei();">
    <div class="zs-map-tool">
        <div class="location">
            <a href="javascript:;">首页</a>
            <i class="right-arr"></i>
            <a href="javascript:;">运维管理</a>
            <i class="right-arr"></i>
            <a href="javascript:;">应用系统注册</a>
        </div>
        <div class="option">
            <input type="button" class="zs-btn orange" value="新建" 
                ng-click="addRow('registerservice') && openWindow('edit');">
            <input type="button" class="zs-btn orange" value="编辑" 
                ng-click="editRow('registerservice', registerservice.sRows[0]) && openWindow('edit')">
            <input type="button" class="zs-btn orange" value="单点登录授权"
                ng-click="editRow('registerservice', registerservice.sRows[0]) && openWindow('edit2')">
            <input type="button" class="zs-btn orange" value="接口访问授权"
                ng-click="editRow('registerservice', registerservice.sRows[0]) && openWindow('edit3')">
            <input type="button" class="zs-btn orange" value="删除"
                ng-click="delEntitys('registerservice')">
        </div>
    </div>
    <div class="zs-content" style="position:unset">
        <div class="zs-nice-tab idTabs">
        	<div class="tool item" style="margin-left:6px;">
                <span class="search-warpper">
                    <i class="icon"></i>
                    <input type="text" placeholder="系统名称" class="zs-input" 
                    	ng-model="registerservice.queryObject['display:like']"/>
                </span>
            </div>
            <div class="operation item">
                <a class="ope-1" ng-click="loadData('registerservice')"></a>
                <a class="ope-2"></a>
            </div>
            <div class="switch">
            </div>
        </div>
        <div class="date-container">
            <div id="zpgwd">
                <div class="zs-data-table">
                    <div class="container">
                    	<table>
			                <thead>
			                    <tr>
			                        <th>
			                        	<input id="allCheckbox" type="checkbox"
			                        		ng-click="selectAll('registerservice','allCheckbox');">
			                        </th>
			                        <th>序号</th>
			                        <th>名称/标识</th>
			                        <th>访问地址</th>
			                        <th>是否有效</th>
			                        <th>单点登录码</th>
			                        <th>接口访问码</th>
			                        <th>备注</th>
			                    </tr>
			                </thead>
			                <tbody>
			                    <tr ng-repeat="r in registerservice.datas">
					                <td><input type="checkbox"
						                    ng-click="selectRow('registerservice',r);"
						                    ng-model="r.selected" />
					                </td>
					                <td>
					                    <a ng-click="editRow('registerservice',r) && openWindow('edit');">
					                        <label ng-bind="r.order"></label>
					                    </a>
					                </td>
					                <td>
					                    <a ng-click="editRow('registerservice',r) && openWindow('edit');">
					                        <label ng-bind="r.display"></label>(<label ng-bind="r.id"></label>)
					                    </a>
					                </td>
					                <td>
					                    <a ng-click="editRow('registerservice',r) && openWindow('edit');">
					                        <label ng-bind="r.url"></label>
					                    </a>
					                </td>
					                <td>
					                    <a ng-click="editRow('registerservice',r) && openWindow('edit');">
					                        <label ng-bind="r.valid | asChineseBool"></label>
					                    </a>
					                </td>
									<td>
					                    <a ng-click="editRow('registerservice',r) && openWindow('edit');">
					                        <label ng-bind="r.ssoid"></label>
					                    </a>
					                </td>
					                <td>
					                    <a ng-click="editRow('registerservice',r) && openWindow('edit');">
					                        <label ng-bind="r.ifprovide"></label>
					                    </a>
					                </td>
					                <td>
					                    <a ng-click="editRow('registerservice',r) && openWindow('edit');">
					                        <label ng-bind="r.info"></label>
					                    </a>
					                </td>
					            </tr>
			                </tbody>
			            </table>
                    </div>
                </div>
                <div class="zs-pagination-box">
                    <ag-Page fn='registerservice'></ag-Page>
                </div>
            </div>
        </div>

        <div ag-Window id="edit" title="应用系统编辑" width='600px' height='220px'>
	        <div class="zs-form-tab ibox">
	        	<form name="form" novalidate>
				    <table width="100%">
				        <tbody>
				        	<tr>
	                            <td class="text" width="20%">*标识</td>
	                            <td colspan="3" class="left" width="80%">
	                                <input type="text" ng-model="registerservice.editRow.id" alias="标识"
		                            	class="zs-input" ng-if="registerservice.editRow.FIELD_ISNEW" required>
		                            <label ng-bind="registerservice.editRow.id"
		                            	ng-if="!registerservice.editRow.FIELD_ISNEW"></label>
	                            </td>
	                        </tr>
	                        <tr>
	                            <td class="text" width="20%">*名称</td>
	                            <td class="left" width="30%"><input type="text" alias="名称"
	                                name="formDisplay" ng-model="registerservice.editRow.display"
	                                class="zs-input" required></td>
	                            <td class="text" width="20%">描述</td>
		                        <td class="left" width="30%"><input type="text"
		                            class="zs-input" ng-model="registerservice.editRow.info"></td>
	                        </tr>
	                        <tr>
	                            <td class="text" width="20%">*访问地址</td>
	                            <td colspan="3" class="left" width="80%"><input type="text" alias="访问地址"
	                                name="formUrl" ng-model="registerservice.editRow.url"
	                                class="zs-input" required></td>
	                        </tr>
	                        <tr>
	                        	<td class="text" width="20%">序号</td>
		                        <td class="left" width="30%"><input type="text"
		                            class="zs-input" ng-model="registerservice.editRow.order"></td>
	                            <td class="text" width="20%">是否有效</td>
		                        <td class="left" width="30%">
		                        	<input type="checkbox" ng-model="registerservice.editRow.valid"
		                        		ng-true-value="true" ng-false-value="false" value='false' />
		                        </td>
	                        </tr>
				        </tbody>
				        <tfoot>
				            <tr>
				                <td colspan="5">
				                    <input type="button" name="ok" value="保存" class="zs-btn c-red"
				                    	ng-click="formValidate(form) && save('registerservice', registerservice.editRow, saveCloseWindow)"/>
				                    <input type="button" name="ok" value="取消" class="zs-btn c-green" 
				                    	ng-click="closeWindow('edit')" />
				                </td>
				            </tr>
				        </tfoot>
				    </table>
				</form>
			</div>
	    </div>

	    <div ag-Window id="edit2" title="单点登录授权" width='300px' height='170px'>
	        <div class="zs-form-tab ibox">
	        	<form name="form2" novalidate>
				    <table width="100%">
				        <tbody>
				        	<tr>
	                            <td colspan="2" class="left" width="100%">
	                            	功能需二次安全认证，请输入用户名与密码！
	                            </td>
	                        </tr>
	                        <tr>
	                            <td class="text" width="20%">用户名</td>
	                            <td class="left" width="80%">
	                            	<input type="text" alias="用户名"
	                                	name="formDisplay" ng-model="sso.username"
	                                	class="zs-input" required>
	                            </td>
	                        </tr>
	                        <tr>
	                            <td class="text" width="20%">密码</td>
		                        <td class="left" width="80%">
		                        	<input alias="密码" type="password"
		                            	class="zs-input" ng-model="sso.password" required>
		                        </td>
	                        </tr>
				        </tbody>
				        <tfoot>
				            <tr>
				                <td colspan="2">
				                    <input type="button" name="ok" value="授权" class="zs-btn c-red"
				                    	ng-click="formValidate(form2) && regService()"/>
				                    <input type="button" name="ok" value="取消" class="zs-btn c-green" 
				                    	ng-click="closeWindow('edit2')" />
				                </td>
				            </tr>
				        </tfoot>
				    </table>
				</form>
			</div>
	    </div>

	    <div ag-Window id="edit3" title="接口访问授权" width='300px' height='160px'>
	        <div class="zs-form-tab ibox">
	        	<form name="form3" novalidate>
					<div>
				    	<table width="100%">
				    		<tbody>
		                        <tr>
		                            <td class="text" width="20%">授权码</td>
			                        <td class="left" width="80%">
			                        	<input type="text"
		                                	name="formDisplay" ng-model="registerservice.editRow.ifprovide"
		                                	class="zs-input" required>
		                                <a ng-click="createifprovide(registerservice.editRow)">自动生成</a>
			                        </td>
		                        </tr>
		                        <tr>
		                        	<td class="text" width="20%">权限</td>
			                        <td class="left" width="80%">
			                        	<ag-Combotree class="zs-input" style="width:218px;height: 28px"
			                        		para="{	uDictionary:true,
			                        				multiple:true,
			                        				dictionary:'p_sys_service' }"
					                        ng-model="registerservice.editRow.ifpower"
					                        text-Value="registerservice.editRow.ifpowerName" />
			                        </td>
		                        </tr>
					        </tbody>
				    		<tfoot>
				    			<tr>
				    				<td colspan="2">
				    					<input type="button" name="ok" value="授权" class="zs-btn c-red"
				                    		ng-click="formValidate(form3) && save('registerservice', registerservice.editRow, saveCloseWindow)"/>
					                    <input type="button" name="ok" value="取消" class="zs-btn c-green" 
					                    	ng-click="closeWindow('edit3')" />
				    				</td>
				    			</tr>
				    		</tfoot>
				    	</table>
				    </div>
				</form>
			</div>
	    </div>
    </div>
</div>